package com.neuedu.his.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.neuedu.his.po.Medicalrecord;
import com.neuedu.his.service.MedicalrecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/medicalrecord")
public class MedicalRecordColltroller {

    @Autowired
    private MedicalrecordService service;


    @RequestMapping("/getBycasenumber")  // 修改路径名
    public List<Medicalrecord> getBycasenumber(@RequestParam Integer casenumber) {  // 方法名也修改
        System.out.println("getBycasenumber   casenumber="+casenumber);
        QueryWrapper<Medicalrecord> qw = new QueryWrapper<>();
        qw.eq("casenumber", casenumber);
        return service.list(qw);
    }


}
